import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
  state: {
    count: 100
  },
  mutations: {
    addCount(state, val = 1) {
      state.count += val
    },
    subCount(state, val = 1) {
      state.count -= val
    }
  }
})
export default store
